<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>用户零钱记录</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}viewer.min.css" type="text/css"/>

	<script type="text/javascript" src="{$url_js}jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="{$url_js}viewer-jquery.min.js"></script>
	<style type="text/css">
		{literal}
		.page_info div {
			display: inline-block;
		}

		.page_info .p_l {
			color: #666;
			float: left;
			line-height: 69px;
			font-size: 16px;
		}

		.page_info .p_r {
			color: #337AB7;
			float: right;
		}

		{/literal}
	</style>
</head>
<body>
<div class="container" style="width: 96%">
	<form action="?do=default" method="get">
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td colspan="7">
					<h5>用户金果记录</h5>
				</td>
			</tr>
			<tr>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">用户ID</div>
						<input type="text" class="form-control" name="s_userid" placeholder="用户ID" value="{$s_data['s_userid']}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">手机号码</div>
						<input type="text" class="form-control" name="s_mobile" placeholder="手机号码" value="{$s_data['s_mobile']}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">类型</div>
						<select class="form-control" name="s_type">
							<option value="">全部</option>
							{foreach $type as $k => $v}
								{if $s_data['s_type'] == $k}
									<option value="{$k}" selected>{$v}</option>
								{else}
									<option value="{$k}">{$v}</option>
								{/if}
							{/foreach}
						</select>
					</div>
				</td>
				{if $s_data['s_type'] == 105}
					<td class="form-group col-xs-2">
						<div class="input-group">
							<div class="input-group-addon">商家ID</div>
							<input type="text" class="form-control" name="s_shopid" placeholder="商家ID" value="{$s_data['s_shopid']}">
						</div>
					</td>
				{/if}
			</tr>
			<tr>
				<td class="form-inline col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">创建开始时间</div>
						<input class="form-control" id="start_time" name="start_time" type="text"
						       onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'end_time\')}'}{/literal});"
						       value="{$s_data['s_start_time']}" readonly="">
					</div>
				</td>
				<td class="form-inline col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">创建结束时间</div>
						<input class="form-control" id="end_time" name="end_time" type="text"
						       onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 23:59:59',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'start_time\')}'}{/literal});"
						       value="{$s_data['s_end_time']}" readonly="">
					</div>
				</td>
				<td class="form-group col-xs-2" colspan="6" align="right">
					<input type="submit" value="搜索" class="btn btn-primary"/>
					<input type="submit" name="exportExcel" value="导出" class="btn btn-primary"/>
				</td>
			</tr>
		</table>
	</form>
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td align="center" style="width: 100px">记录ID</td>
				<td align="center" style="width: 100px">用户ID</td>
				<td align="center" style="width: 100px">用户昵称</td>
				<td align="center" style="width: 100px">记录类型</td>
				<td align="center" style="width: 150px">金果数</td>
				{if $s_data['s_type'] == 105}
					<td align="center" style="width: 150px">商家ID</td>
					<td align="center" style="width: 150px">商家名称</td>
				{/if}
				<td align="center" style="width: 150px">创建时间</td>
			</tr>
			{foreach $list as $k => $v}
				<tr>
					<td align="center">{$v['CoinLogId']}</td>
					<td align="center">{$v['UserId']}</td>
					<td align="center">{$user[$v['UserId']]}</td>
					<td align="center">{$type[$v.Type]}</td>
					<td align="center">{if $v.Type < 100}<span style="color: red">-{$v['CoinNum']}</span>{else}<span style="color: blue">+{$v['CoinNum']}</span>{/if}</td>
					{if $s_data['s_type'] == 105}
						<td align="center" style="width: 150px">{$v.Info}</td>
						<td align="center" style="width: 150px">{$shop[$v['Info']]}</td>
					{/if}
					<td align="center" >
						{$v.CreateTime}
					</td>
				</tr>
			{/foreach}
		</table>
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td colspan="7" align="right">
					<div class="page_info">
						{if $page_info['count']}
							<div class="p_l">一共 {$page_info['count']} 条数据,共 {$page_info['page']} 页</div>
						{/if}
					</div>
					<div class="p_r">{$pagination}</div>
				</td>
			</tr>
		</table>
</div>

<script type="text/javascript">
	{literal}
	{/literal}
</script>

</body>
</html>